home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_i_l / incx101b.zip / INC-PROG.LZH / HELP.LZH / MCAEL.HLP < prev    next >
Text File  |  1991-07-26  |  39KB  |  700 lines

  1. mcael
  2.  Help information about: InContext Procedure Language
  3.  
  4.  
  5.               E╔════════════════════════════════════════════════╗
  6.               E║          CInContext Procedure LanguageE          ║
  7.               E╚════════════════════════════════════════════════╝
  8.  
  9.  
  10.  CA Word to the Wise...
  11.  
  12.    If you can write MS-DOS batch procedures, you should have no difficulty
  13.    learning to use the InContext Procedure Language.  If "batch files" are
  14.    beyond your present capability, though, then you may want to learn about
  15.    them before you undertake to write your own InContext procedures.  You
  16.    should find the information you need in your MS-DOS User Guide.
  17.  
  18.    The procedures you write here will usually be based on MS-DOS commands,
  19.    with some notable assistance from a few special commands made available by
  20.    InContext.  Programming, particularly of the "batch file" sort, is really
  21.    not very difficult, and there's no reason to be intimidated by it.  It
  22.    should not be done carelessly, though, since it is possible to
  23.    inadvertently modify, or even delete, files.  Current backups of your
  24.    files can be a real lifesaver, whether you're testing out new procedures
  25.    or not, but they're especially wise in such a case.
  26.  
  27.    You may find it helpful to F ªPDrint B this information, for easy reference.
  28.  
  29.  CHow InContext Procedures Work
  30.  
  31.    A CprocedureB is a list of commands that are executed when:
  32.  
  33.  ZmcaB       CB an CactionB is selected (see CJ Actions CB).
  34.  
  35.  ZmcdB       CB an item from the CdoB list is selected (see CJ The Do Command CB).
  36.  
  37.    The CcommandsB in a procedure consist of some mixture of CMS-DOS commands
  38.    and Cinternal InContext commandsB.  You are assumed to be familiar with the
  39.    common MS-DOS commands, such as "echo", "copy", "move", etc., and we will
  40.    also refer to the invocation of other programs as a use of "MS-DOS
  41.    commands", since they are invoked by asking MS-DOS to execute them. 
  42.    Obviously, though, the InContext commands are unfamiliar, and they will be
  43.    discussed in detail below.
  44.  
  45.    When a procedure is executed, the commands are executed in sequence,
  46.    starting at the top (except as this may be altered by MS-DOS CgotoB, and
  47.    InContext CmenuB and CforEachObjectB commands).  The internal commands are
  48.    simply executed by InContext when it reaches them.  MS-DOS commands have
  49.    to be passed to the MS-DOS command processor, though.  (Normally, this
  50.    is the program "command.com", but some users substitute an alternative
  51.    command processor.)
  52.  
  53.    If several consecutive lines of a procedure are MS-DOS commands, they are
  54.    passed to the command processor by writing them out as an MS-DOS batch
  55.    file and arranging for the command interpreter to execute the batch file.
  56.    If an MS-DOS command occurs alone in a procedure, or is surrounded by
  57.    internal commands, it is passed directly to the command processor without
  58.    being written to a batch file.  Since there is some overhead associated
  59.    with invoking the command processor, you can see that CunnecessaryB
  60.    alternation between MS-DOS commands and internal commands would impede
  61.    performance.
  62.  
  63.    If an error occurs during execution of a procedure, InContext will display
  64.    the error message and halt execution of the procedure.  Please note that
  65.    InContext has no direct way of knowing about errors that may have occurred
  66.    during the execution of other programs (command.com does not return the
  67.    ERRORLEVEL value that is available for testing within batch files).  The
  68.    only errors that can be directly detected by InContext are errors in the
  69.    execution of its internal commands.  For this reason, if for no other, you
  70.    should probably use the CinternalB versions of such commands as copy,
  71.    delete, etc.
  72.  
  73.  CSwapping InContext Out of Main Memory
  74.  
  75.    Whenever the MS-DOS command processor is invoked to execute an MS-DOS
  76.    command or another program, part of the InContext program and data are
  77.    "swapped out".  That is, a portion of InContext is written out to either
  78.    EMS memory or to disk, in order to make room for the (possibly large)
  79.    program that is being invoked.  You can control how this swapping occurs,
  80.    and how much memory is freed.  This is done globally by setting the
  81.  ZmcmoeB  appropriate configuration options (see CJ MS-DOS Command Execution CB),
  82.    and locally by the CmemoryB command (see below).
  83.  
  84.  CA Small Example
  85.  
  86.    The following example is a little contrived, for which we apologize.  Most
  87.    actions require only a one-line procedure, and we need an example here
  88.    that will illustrate a bit more than those actions would allow.
  89.  
  90.    Let's suppose that you have a spelling-checker program called "spellit",
  91.    which scans an ASCII text file, noticing words that don't match any entry
  92.    in the program's dictionary.  Assume that the program prompts the user for
  93.    corrections in such a case, and rewrites the file, with spelling
  94.    corrections, on exit.  Let's suppose that it also updates its own
  95.    dictionary if you give it new words during an execution, and that the
  96.    dictionary is kept in the directory "c:\mystuff".  Finally, let's
  97.    assume that spellit requires no more than 256K (256 kilobytes of main
  98.    memory) to run.  If we would like to add a "spell-chk" action for objects
  99.    of the "txt" class.
  100.  
  101.    An acceptable procedure for such an action might be simply
  102.  
  103.         spellit %f
  104.  
  105.    where the characters "%f" will be replaced by the filename of the selected
  106.    text object.  A more complete procedure, though, might be
  107.  
  108.         !memory 256
  109.         spellit %f
  110.         !relogDir c:\mystuff
  111.  
  112.    This procedure illustrates the use of both internal commands and MS-DOS
  113.    commands.  The commands preceded by exclamation points (C!B) are internal
  114.    InContext commands.  The first command ("!memory 256") directs InContext
  115.    to swap out only enough of itself to provide 256K of memory for the
  116.    following MS-DOS process.  The second command ("spellit %f") executes
  117.    spellit on the selected object.  The third ("!relogDir c:\mystuff") causes
  118.    InContext to update its record of the contents of the directory
  119.    c:\mystuff, so that it will reflect the modified size, date, etc. of the
  120.    dictionary file.
  121.  
  122.  CVariable Substitution
  123.  
  124.    One thing you need to know more about is variable substitution.  During
  125.    the execution of procedures, InContext looks for a set of one-character
  126.    "variable names", each of which is preceded by the percent (C%B) character.
  127.    Whenever one of these variable names is encountered, it is replaced by an
  128.    appropriate value before the command is executed.  For example, if the
  129.    currently selected object is "mystuff.txt", then the command
  130.         myeditor %f
  131.    becomes
  132.         myeditor mystuff.txt
  133.    before it is passed to MS-DOS for execution.
  134.  
  135.    The InContext variables are:
  136.  
  137.         C%cB  The CclassB of the currently selected object
  138.  
  139.         C%dB  The full pathname of the currently selected Cdirectory
  140.  
  141.         C%DB  The current Cdate
  142.  
  143.         C%fB  The CfilenameB of the currently selected object
  144.  
  145.         C%hB  The Cfull pathnameB of the currently selected object
  146.  
  147.         C%kB  The name of the currently selected CtaskB
  148.  
  149.         C%KB  The CdescriptionB of the currently selected task
  150.  
  151.         C%lB  The number of ClinesB currently on the video display
  152.  
  153.         C%mB  For use only in the group action list, the CmultipleB filespec that
  154.             describes the currently displayed objects.  This might be
  155.             replaced by "*.*", if the "ALL" view is selected, or by "*.txt",
  156.             if only the text class is selected, or by "*.doc *.txt" if a view
  157.             containing both "doc" and "txt" classes is selected.
  158.  
  159.         C%pB  The filename CprefixB of the currently selected object
  160.  
  161.         C%TB  The current Ctime
  162.  
  163.         C%uB  The name of the current CuserB of InContext
  164.  
  165.    The following additional variables are related to the "query" command.
  166.  
  167.         C%1B  The current value of variable 1
  168.         C%2B  The current value of variable 2
  169.         C%3B  The current value of variable 3
  170.         C%4B  The current value of variable 4
  171.         C%5B  The current value of variable 5
  172.         C%6B  The current value of variable 6
  173.         C%7B  The current value of variable 7
  174.         C%8B  The current value of variable 8
  175.         C%9B  The current value of variable 9
  176.  
  177.    The following additional variables have meaning only when executing a
  178.    "forEachObject" loop:
  179.  
  180.         C%CB  The class of the current object
  181.         C%FB  The filename of the current object
  182.         C%HB  The full pathname of the current object
  183.         C%PB  The filename prefix of the current object
  184.  
  185.  CMacros
  186.  
  187.    The use of Macros is common in programming languages at all levels, and
  188.    it can greatly increase power and reuseability of procedures.  For
  189.  ZmcaemB   information, see CJ Macro Action Definitions CB),
  190.  
  191.    Macros in procedures are indicated by the use of the pound sign (C#B) as the
  192.    first character of the line.  Thus, a common way of invoking the user's
  193.    preferred text editor is
  194.       #editText
  195.    where the "editText" macro contains the detailed command(s) necessary
  196.    to invoke the editor in the desired manner.
  197.  
  198.  CInContext Internal Commands
  199.  
  200.    The internal commands are listed below, along with descriptions and, where
  201.    appropriate, examples.  For any commands that take arguments, the syntax
  202.    of the command is also shown.  In syntax descriptions, everything shown
  203.    in CboldB text must appear as shown, while everything shown in ordinary
  204.    text is a placeholder.  Optional information is surrounded by square
  205.    brackets.  Thus, the description:
  206.         CdeleteB [ filename ] [ CnoqueryB ]
  207.    indicates that the delete command takes two optional arguments, one of
  208.    which is a filename and the other of which is the string "noquery".
  209.  
  210.    The internal commands you would ordinarily use are:
  211.                         
  212.         CchangeDirB       This command changes the current working
  213.                         directory to a specified directory.  The chosen
  214.                         directory will remain the current working directory
  215.                         until the next "changeDir" command, or the next
  216.                         MS-DOS "cd" command, or the end of the procedure.
  217.                         This command is equivalent to the MS-DOS "cd" command
  218.                         except that it can cause a change in drive, as well
  219.                         as directory.  Syntax is:
  220.                            CchangeDirB pathOfNewDir
  221.                         Thus, to change to the "temp" directory on the "d:"
  222.                         drive, the command would be
  223.                            changeDir d:\temp
  224.                         Use of this command is preferable to the MS-DOS "cd"
  225.                         command, because InContext will be aware of the
  226.                         working directory, and will therefore automatically
  227.                         relog the directory.
  228.  
  229.         CchoiceB          See "menu".
  230.  
  231.         CcopyB            This command exhibits two different kinds of
  232.                         behavior, depending on the arguments used.
  233.                         Syntax is:
  234.                            CcopyB [ source destination [ CnoqueryB ] ]
  235.                         If no arguments are used, as in
  236.                            copy
  237.                         the command prompts the user for the name (or
  238.                         possibly directory or full path) to which the
  239.                         selected object should be copied.  If the user
  240.                         responds with such a name or path, the copy operation
  241.                         is executed.
  242.  
  243.                         Alternatively, if source and destination pathnames
  244.                         are given, the indicated source file is copied to
  245.                         the indicated destination.  The source must indicate
  246.                         an existing file, and may be a simple filename, if
  247.                         the file is in the current directory, or a complete
  248.                         pathname.  The destination can be a simple filename
  249.                         or a full pathname.  If the destination is found to
  250.                         be a directory, a new copy of the source will be
  251.                         placed in the destination directory, using the source
  252.                         filename.  Otherwise, a new copy of the source file
  253.                         will be created and given the destination filename.
  254.  
  255.                         If there is already a file using the destination
  256.                         name, the user will be asked for permission before
  257.                         copying occurs, unless the "noquery" argument is
  258.                         present.  Thus, the command
  259.                            copy myfile.txt a:\ noquery
  260.                         would copy "myfile.txt" to the root directory of the
  261.                         A: drive, and would not ask permission before over-
  262.                         writing a file of the same name there.
  263.  
  264.         CcreateObjectB    This command creates a new object, based on the
  265.                         filename prefix and class specified in the command.
  266.                         Syntax is:
  267.                            CcreateObjectB prefix class
  268.                         Thus, the command "createObject mynext doc" would
  269.                         create the object "mynext.doc" in the current
  270.                         directory.
  271.  
  272.         CdeleteB          This command deletes the specified object, or if
  273.                         none is specified, deletes the currently selected
  274.                         object.  The user is asked for permission before
  275.                         deletion, unless "noquery" is specified.  Syntax is:
  276.                            CdeleteB [ filename ] [ CnoqueryB ]
  277.                         Thus, to delete the file "mytemp.txt", without asking
  278.                         user permission, the command would be
  279.                            delete mytemp.txt noquery
  280.                         If the file does not exist, no deletion occurs and
  281.                         no error is noted.
  282.  
  283.         CeditB            This command invokes the internal editor on the
  284.                         specified file, if any, or on the currently selected
  285.                         object, if no file was specified.  Syntax is:
  286.                            CeditB [ filename ]
  287.  
  288.         CeditDictionaryB  Some of the files used by InContext are
  289.                         "dictionary" files (class "dic").  The internal
  290.                         dictionary editor is made available for use on such
  291.                         objects by this command.  You might use this command
  292.                         to create dictionary files for use with the "info"
  293.                         command (see below).  Syntax is:
  294.                            CeditDictionaryB [ filename ]
  295.  
  296.         CendForB          See "forEachObject".
  297.  
  298.         CendMenuB         See "menu".
  299.  
  300.         CforEachObjectB   This command allows you to execute a portion of
  301.                         a procedure once for each object currently being
  302.                         displayed.  You might use it if you have a program
  303.                         that only operates on one file at a time, but you
  304.                         want to be able to invoke it on a whole class or
  305.                         view.  If the program is question is "theprog", the
  306.                         commands required would be:
  307.  
  308.                            !forEachObject
  309.                               theprog %F
  310.                            !endFor
  311.  
  312.                         Notice that the "endFor" command is also required,
  313.                         and that it indicates the end of the loop that will
  314.                         be executed once for each object.  Notice also that
  315.                         the special variable names %F, %H, %C, and %P must be
  316.                         used instead of %f, %h, %c, and %p.
  317.  
  318.         CinfoB            This command allows you to display a scrollable
  319.                         window containing text you have written.  It is
  320.                         useful for providing explanations of a procedure
  321.                         during its execution.  Syntax is:
  322.                            CinfoB dictionaryPath term [ title ]
  323.                         The information displayed will be the definition of
  324.                         the specified term, taken from the dictionary ("dic"
  325.                         object) whose full MS-DOS pathname is specified.
  326.                         If you provide a title, that title will be displayed,
  327.                         as well.  For example, to display information at the
  328.                         beginning of a Do procedure that downloads stock
  329.                         prices, you might use the command:
  330.                            info c:\incontxt\myinfo.dic getprice
  331.  
  332.         CkeyStuffB        This command allows you to place information in the
  333.                         keyboard buffer before calling an application. 
  334.                         Suppose, for example, you have a word processor that
  335.                         doesn't allow you to specify a filename on the
  336.                         command line, but expects you to select a "file load"
  337.                         command after you're in the program.  You might use a
  338.                         command sequence like:
  339.  
  340.                              !keyStuff "FL%f\EN"
  341.                              myWordProc
  342.  
  343.                         to cause it to automatically load the selected object
  344.                         upon entry.  The !keyStuff command loads the keyboard
  345.                         buffer with the command characters 'F' and 'L',
  346.                         followed by the filename of the currently selected
  347.                         object, followed by the ENTER key.  Those characters
  348.                         will then be read by the program "myWordProc" as if
  349.                         they had been typed from the keyboard after the
  350.                         program was invoked.  This will not work with ALL
  351.                         programs, but works with most.  This feature greatly
  352.                         increases your ability to "encapsulate" applications
  353.                         with InContext.
  354.  
  355.                         There are a number of special characters that can be
  356.                         loaded into the keyboard buffer using this technique.
  357.                         An example is the ENTER key designated by the "\EN"
  358.                         in the example above.  These special characters are
  359.                         all indicated by a backslash and a two-character code
  360.                         that represents the special character.  The codes are
  361.                         as follows:
  362.  
  363.                              For Cfunction keysB, the code consists of the
  364.                              character "F", followed by a numeric digit from
  365.                              1 through 0.  These correspond to function keys
  366.                              F1 through F10.  "\FA" also means F10, and
  367.                              "FB" and "FC" correspond to F11 and F12 on the
  368.                              extended keyboard.  (The hexadecimal symbols for
  369.                              10, 11, and 12 are A, B, and C, respectively.)
  370.  
  371.                              If Cshifted function keysB are desired, the codes
  372.                              are "\S1" through "\S0" and "\SA" through "\SC".
  373.                              CControl-function-keyB combinations are obtained
  374.                              by "\C1" through "C0" and "\CA" through "\CC".
  375.                              CAlt-function-keyB combinations are "\A1" through
  376.                              "\A0" and "\AA" through "\AC".
  377.  
  378.                              Ordinary Ccontrol charactersB, such as control-A,
  379.                              use codes beginning with '^'.  Thus, "\^A"
  380.                              through "\^Z" mean control-A through control-Z,
  381.                              and control-key versions of the following
  382.                              additional characters can be created this way:
  383.                                   [ \ ] ^ _ @
  384.  
  385.                              Ordinary Calt-key charactersB, such as alt-A,
  386.                              use codes beginning with '@'.  Thus, "\@A"
  387.                              through "\@Z" mean alt-A through alt-Z,
  388.                              and alt-key versions of the following
  389.                              additional characters can be created this way:
  390.                                   numeric digits, -, =
  391.  
  392.                              All remaining Cspecial charactersB are shown in
  393.                              the following table:
  394.                                   LA    left arrow
  395.                                   LC    control left arrow
  396.                                   RA    right arrow
  397.                                   RC    control right arrow
  398.                                   UA    up arrow
  399.                                   UC    control up arrow
  400.                                   DA    down arrow
  401.                                   DC    control down arrow
  402.                                   HM    home
  403.                                   HC    control home
  404.                                   ED    end
  405.                                   EC    control end
  406.                                   PU    page up
  407.                                   QU    control page up
  408.                                   PD    page down
  409.                                   QD    control page down
  410.                                   IN    insert
  411.                                   DE    delete
  412.                                   G+    grey +
  413.                                   G-    grey -
  414.                                   G*    grey *
  415.                                   PS    PrtSc
  416.                                   PC    control PrtSc
  417.                                   TA    tab
  418.                                   BT    back tab
  419.                                   ES    escape
  420.                                   BS    back space
  421.                                   EN    ENTER (carriage return)
  422.                                   LF    line feed
  423.                                   N0    numeric key-pad 0
  424.                                   N1    numeric key-pad 1
  425.                                   N2    numeric key-pad 2
  426.                                   N3    numeric key-pad 3
  427.                                   N4    numeric key-pad 4
  428.                                   N5    numeric key-pad 5
  429.                                   N6    numeric key-pad 6
  430.                                   N7    numeric key-pad 7
  431.                                   N8    numeric key-pad 8
  432.                                   N9    numeric key-pad 9
  433.                                   N.    numeric key-pad .
  434.                                   N+    numeric key-pad +
  435.                                   N-    numeric key-pad -
  436.                                   N*    numeric key-pad *
  437.  
  438.                         To stuff the backslash character into the buffer, use
  439.                         two backslashes in succession, as "\\".
  440.  
  441.                         In the current version of InContext, the string that
  442.                         is loaded by "!keyStuff" is restricted to 15
  443.                         characters.  This will be extended in a later
  444.                         version.
  445.  
  446.                         Incidentally, whenever InContext executes another
  447.                         program, it clears the keyboard buffer on return.
  448.                         This prevents unprocessed keystrokes from doing
  449.                         unexpected things upon return to InContext.  However,
  450.                         if the "!keyStuff" command is used and not followed
  451.                         by the execution of another program, the keystrokes
  452.                         are left in the buffer and read by InContext as if
  453.                         you had typed them in yourself.  This allows you to
  454.                         define procedures that exert user-level control over
  455.                         InContext, if you like.  This is recommended for
  456.                         knowledgable users only.
  457.  
  458.                         An especially useful application of the latter is in
  459.                         an InContext startup ("incStart") macro.  By placing
  460.                         in that macro, for example,
  461.                            !keyStuff "df"
  462.                         it is possible to cause the automatic execution of
  463.                         a Do procedure (e.g., "fontset") at InContext
  464.                         initialization time.
  465.  
  466.         CmemoryB          This command allows you to specify the amount of
  467.                         memory needed for the next following block of MS-DOS
  468.                         commands.  You can optimize InContext performance by
  469.                         requesting only what is actually needed, if you
  470.                         choose to do so.  Syntax is:
  471.                            CmemoryB kilobytes
  472.                         Thus, to invoke a simple word-count program that
  473.                         needs only 64K of memory, you might use the commands
  474.                            !memory 64
  475.                            wc %f
  476.  
  477.         CmenuB            This command allows you to construct menus within
  478.                         a procedure.  Syntax is:
  479.                            CmenuB [ title ]
  480.                         This command is used with a series of "choice"
  481.                         commands and an "endMenu" command, to specify a whole
  482.                         menu and the consequences of each possible choice.
  483.                         A simple example is:
  484.  
  485.                            !menu "Do which simple MS-DOS operation?"
  486.                               !choice "Check disk"
  487.                                  chkdsk
  488.                               !choice "Show directory contents"
  489.                                  dir
  490.                            !endMenu
  491.  
  492.                         Menus may not be nested (but notice that that
  493.                         probably isn't necessary, given that the menus occur
  494.                         in the context of actions that are themselves menu-
  495.                         selected).
  496.  
  497.         CnoRelogB         This command can be used to slightly speed up
  498.                         the return of InContext after a procedure, if you
  499.                         know that the procedure cannot alter any files.
  500.                         By letting InContext know that the files cannot be
  501.                         altered, you eliminate the need for relogging the
  502.                         files in the current directory upon return from the
  503.                         procedure.  This command can occur anywhere in the
  504.                         procedure.  A common example would be the use of a
  505.                         viewer:
  506.                            !noRelog
  507.                            pcxview %f
  508.  
  509.         CpauseB           This command causes InContext to pause, and wait
  510.                         for a keystroke or mouse key depression.  It is used
  511.                         immediately after a DOS command or external program
  512.                         in order to allow the user to look at the results of
  513.                         that operation before returning to InContext.
  514.  
  515.         CqueryB           This command allows you to ask the user for
  516.                         information, and then to use the information in
  517.                         subsequent commands in the procedure.  Syntax is:
  518.                            CqueryB variable question length
  519.                         InContext provides nine variables whose values can
  520.                         be set by query commands.  The first argument is the
  521.                         number of the variable that will contain the user's
  522.                         answer.  The second argument is the text of a
  523.                         question that will be asked.  The third argument is
  524.                         the length, in characters, of the answer field.
  525.                         At the risk of waxing a little fanciful, suppose you
  526.                         have a program, "coatarms" that displays a coat of
  527.                         arms for the user's family, given his family name.
  528.                         You might write:
  529.                            !query 3 "Enter your last name" 20
  530.                            coatarms %3
  531.                         If the user answers "Smith", this would result in
  532.                         the actual execution of the command "coatarms Smith".
  533.  
  534.         CrelogDirB        Unless you use the "noRelog" command, InContext
  535.                         always checks all the files in the current directory
  536.                         at the end of each procedure, to make sure that its
  537.                         object list is up-do-date.  It does CnotB automatically
  538.                         relog other directories, however.  If you execute a
  539.                         program that is known to modify the contents of some
  540.                         other directory, you can cause InContext to update
  541.                         the log for that directory as well, by use of the
  542.                         "relogDir" command.  Syntax is:
  543.                            CrelogDirB pathOfDirectory
  544.                         For example, if your editor automatically backs up
  545.                         all files to the directory "c:\backup", and you want
  546.                         the object list to be current whenever you go to that
  547.                         directory, you might use the sequence
  548.                            myeditor %f
  549.                            !relogDir c:\backup
  550.                         to invoke your editor.
  551.  
  552.         CrenameB          This command exhibits two different kinds of
  553.                         behavior, depending on the arguments used.
  554.                         Syntax is:
  555.                            CrenameB [ source destination [ CnoqueryB ] ]
  556.                         If no arguments are used, as in
  557.                            rename
  558.                         the command prompts the user for the new name for
  559.                         the selected object.  This may be a simple filename
  560.                         or a full pathname (this command can be used to move
  561.                         the selected object to another directory, or even
  562.                         another drive).  If the user responds with such a
  563.                         name, the object is moved and/or renamed, as
  564.                         appropriate.
  565.  
  566.                         Alternatively, if source and destination pathnames
  567.                         are given, the indicated source file is moved to
  568.                         the indicated destination.  The source must indicate
  569.                         an existing file, and may be a simple filename, if
  570.                         the file is in the current directory, or a complete
  571.                         pathname.  The destination can be a simple filename
  572.                         or a full pathname.  If the destination is found to
  573.                         be a directory, the source object will be placed in
  574.                         the destination directory, using the source filename.
  575.                         Otherwise, the source object will be given the
  576.                         destination filename, and moved to the indicated
  577.                         drive or directory if that information was included
  578.                         in the destination.
  579.  
  580.                         If there is already a file using the destination
  581.                         name, the user will be asked for permission before
  582.                         renaming occurs, unless the "noquery" argument is
  583.                         present.  Thus, the command
  584.                            rename myfile.txt a:\ noquery
  585.                         would move "myfile.txt" to the root directory of the
  586.                         A: drive, and would not ask permission before over-
  587.                         writing a file of the same name there.
  588.  
  589.         CresetMouseB      Some programs which you may invoke from within
  590.                         InContext disable the mouse and fail to restore it
  591.                         upon exit.  If you don't see a cursor upon return
  592.                         from such a program, or if the mouse no longer works,
  593.                         you should add the "resetMouse" command to the
  594.                         procedure.  On some machines, the mouse reset
  595.                         operation adds a second or two to the time required
  596.                         to return to InContext; that's why it isn't done
  597.                         every time.
  598.  
  599.         CunloadB          A few memory-hungry applications may require more
  600.                         memory for their execution than InContext can make
  601.                         available by swapping itself to disk or EMS.  A good
  602.                         example is Ventura Publisher, if run on a machine
  603.                         that doesn't have EMS memory.  The "unload" command
  604.                         can be used to cause InContext to write out the
  605.                         desired MS-DOS commands to a batch file, and then
  606.                         Cquit altogetherB, freeing CallB of the memory
  607.                         used by InContext.  Since the batch file is still
  608.                         there, it can be executed from DOS.
  609.  
  610.                         When you installed InContext, you installed a batch
  611.                         file, "inc.bat", which is used to execute InContext.
  612.                         "inc.bat" checks, after each invocation of InContext,
  613.                         to see if a procedure batch file has been left behind
  614.                         for execution.  If so, that batch file is executed
  615.                         and InContext is reloaded.
  616.  
  617.                         You will only want to "unload" InContext in those few
  618.                         cases that really need it, for performance reasons.
  619.                         Note that, when "unload" is used, only the block of
  620.                         MS-DOS commands immediately CfollowingB "unload" can
  621.                         be executed.  If you have any additional internal
  622.                         commands after that block, they will not be executed.
  623.  
  624.         CverifyB          This command asks the user if it's OK to proceed,
  625.                         and terminates the procedure if the user fails to
  626.                         answer "Yes".  Syntax is:
  627.                            CverifyB [ question ]
  628.                         If a question is specified, it is asked instead of
  629.                         the default question.  Thus, a possible form of this
  630.                         command is
  631.                            verify "Is it OK to archive this file?"
  632.  
  633.         CviewB            This command invokes the internal viewer on the
  634.                         specified file, if any, or on the currently selected
  635.                         object, if no file was specified.  Syntax is:
  636.                            CviewB [ filename ]
  637.  
  638.         CviewArchiveB     This command invokes the internal archive viewer
  639.                         on the specified file, if any, or on the currently
  640.                         selected object, if no file was specified.  Syntax is:
  641.                            CviewArchiveB type [ filename ]
  642.  
  643.                         The "type" argument can be any of the following, and
  644.                         specifies both the archive file format and the
  645.                         archiver program(s) to be used:
  646.  
  647.                            CACAB  ARC format, using ARCA/ARCE.
  648.  
  649.                            CARCB  ARC format, using SEA's ARC.
  650.  
  651.                            CARJB  ARJ format, using ARJ.
  652.  
  653.                            CLZHB  LZH format, using LHA.
  654.  
  655.                            CPAKB  PAK format, using PAK.
  656.  
  657.                            CPKPB  ARC format, using PKPAK/PKUNPAK
  658.  
  659.                            CZIPB  ZIP format, using PKZIP/PKUNZIP.
  660.  
  661.                         For example, the following command would invoke the
  662.                         archive viewer on an ARC-type document archive called
  663.                         DOC-ARCV.XYZ, using the PKPAK/PKUNPAK programs for
  664.                                 any archive operations:
  665.  
  666.                            viewArchive PKP doc-arcv.xyz
  667.                        
  668.         CviewLZHB         This command invokes the internal LHA viewer
  669.                         on the specified file, if any, or on the currently
  670.                         selected object, if no file was specified.  Syntax is:
  671.                            CviewLZHB [ filename ]
  672.  
  673.                         This command is now obsolete, and will not be
  674.                         supported in future versions.  Use "viewArchive LZH",
  675.                         instead.
  676.  
  677.    The following commands are also available, but you will ordinarily have
  678.    no need to use them in your own procedures:
  679.  
  680.         CdeleteDirB       If the current directory is empty and is not the
  681.                         root directory of its drive, this command deletes the
  682.                         directory and moves to the next directory above it.
  683.  
  684.         CdeleteGroupB     This command checks with the user first, and then
  685.                         deletes each currently displayed object.  Depending
  686.                         on the user's choice, the objects can be deleted or
  687.                         saved individually, or deleted as a group in a single
  688.                         operation, or the command can be aborted.
  689.  
  690.         CputB             This command drops either a copy or the original
  691.                         of an object being "carried" into the current
  692.                         directory.  The user is asked which is preferred.
  693.                         This command is really only intended for internal
  694.                         InContext use.
  695.  
  696.         CtakeB            This command causes InContext to "pick up" the
  697.                         selected object, for possible later copying or moving
  698.                         via the "put" command, above.
  699.  
  700.